<%@page import="com.kaishengit.entity.CarItem"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String id = request.getParameter("id");
	String num = request.getParameter("num");
	
	List<CarItem> shopCar = (List<CarItem>)session.getAttribute("shopCar");
	
	for(CarItem item : shopCar) {
		if(item.getProd().getId() == Integer.parseInt(id)) {
			item.setNum(Integer.parseInt(num));
			break;
		}
	}
	
	
	response.sendRedirect("shopcar.jsp");
	
%>
